package com.star.exception;

/**
 * 服务级异常
 *
 * @author tanyapeng
 */
public class ServiceException extends RuntimeException {

    private final int code;
    private final String message;

    public ServiceException() {
        this.code = 20000;
        this.message = "服务异常";
    }

    public ServiceException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
